package com.itlr.controller;


import com.itlr.common.BaseResponse;
import com.itlr.common.ResultUtils;
import com.itlr.entity.SysUser;
import com.itlr.service.SysUserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/user")
public class UserController {
    @Resource
    private SysUserService userService;
    @GetMapping("/{id}")
    public BaseResponse<SysUser> getUserById(@PathVariable Long id){
        return ResultUtils.success(userService.getById(id));
    }

}
